package indi.zhifa.engine.core.common.web.utils;

import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;

public class MyClassPathScanner extends ClassPathScanningCandidateComponentProvider {

    public MyClassPathScanner() {
        super(false);
    }

    @Override
    protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition){
        return beanDefinition.getMetadata().isInterface() && beanDefinition.getMetadata().isIndependent()
                || beanDefinition.getMetadata().isConcrete();
    }
}
